home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Win FX 2.xpl < prev    next >
Text File  |  2001-03-17  |  3KB  |  131 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="4"
  4. "UIPATH"="Appearance\Interface\Effects"
  5. "NAME"="Windows FX Options #2"
  6. "VERSION"="1.00"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Show menu shortcuts underlined"
  9. "TEXT 2"="Animate menu appearing"
  10. "TEXT 3"="Animate combobox appearing"
  11. "TEXT 4"="Animate listbox and combobox scrolling"
  12. "DESCRIPTION 1"="Note: Not all of these options will work on your computer, and they may make your system much slower."
  13. "AUTHOR"="Xteq Systems"
  14. "CONTACTURL"="http://www.xteq.com"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="Thanks to the german magazine c't (http://www.heise.de/ct/) for the description!"
  17.  
  18.  
  19. '0x20 = Menues underlindes
  20. c_ValMenuUnderlined=&H20
  21.  
  22. '0x02 = Animate Menu 
  23. c_ValMenuAnimated=&H02
  24.  
  25. '0x04 = Animate Combobox
  26. c_ValComboAnimated=&H04
  27.  
  28. '0x08 = Animate Scroll Listboxes/Comboboxes
  29. c_ValScrollAnimated=&H08
  30.  
  31.  
  32.  
  33.  
  34. Sub Plugin_Initialize 
  35.  if RegValueExists(UPM_GetUPMRegPath) then
  36.     if UPM_IsValueActivated(c_ValMenuUnderlined)=true then
  37.        Call SetUIElement(1,true)
  38.     end if
  39.  
  40.     if UPM_IsValueActivated(c_ValMenuAnimated)=true then
  41.        Call SetUIElement(2,true)
  42.     end if
  43.  
  44.     if UPM_IsValueActivated(c_ValComboAnimated)=true then
  45.        Call SetUIElement(3,true)
  46.     end if
  47.  
  48.     if UPM_IsValueActivated(c_ValScrollAnimated)=true then
  49.        Call SetUIElement(4,true)
  50.     end if
  51.  
  52.  else
  53.     Call Disable
  54.  end if
  55.  
  56. End Sub
  57.  
  58. Sub Plugin_CheckData(ElementIndex)
  59. End Sub
  60.  
  61. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  62.  b=GetUIElement(1)
  63.  Call UPM_SwitchValue(c_ValMenuUnderlined,b)
  64.  
  65.  b=GetUIElement(2)
  66.  Call UPM_SwitchValue(c_ValMenuAnimated,b)
  67.  
  68.  b=GetUIElement(3)
  69.  Call UPM_SwitchValue(c_ValComboAnimated,b)
  70.  
  71.  b=GetUIElement(4)
  72.  Call UPM_SwitchValue(c_ValScrollAnimated,b)
  73.  
  74.  
  75.  Call Logoff()
  76. End Sub
  77.  
  78. Sub Plugin_Terminate 
  79. End Sub
  80.  
  81.  
  82. '----------------------------------------------------
  83. '*** UPM (UserPrefenceMask) Functions Version 1.0 ***
  84. '----------------------------------------------------
  85.  
  86. Function UPM_GetUPMRegPath
  87.  if GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then '95/98/ME
  88.     UPM_GetUPMRegPath="HKCU\Control Panel\Desktop\UserPreferenceMask"
  89.  else 'NT/2K/XP (?)
  90.     UPM_GetUPMRegPath="HKCU\Control Panel\Desktop\UserPreferencesMask"
  91.  end if   
  92. End Function
  93.  
  94. Function UPM_IsValueActivated(ValueInHEX)
  95.  UPM_s=RegReadValue(UPM_GetUPMRegPath)
  96.  UPM_s=CStr(UPM_s)
  97.  UPM_s=left(UPM_s,2) 'extract first byte
  98.  UPM_sV="&H" & UPM_s 'convert to HEX
  99.  
  100.  if UPM_sV and ValueInHEX then
  101.     UPM_IsValueActivated=true
  102.  else
  103.     UPM_IsValueActivated=false
  104.  end if
  105. End Function
  106.  
  107. Sub UPM_SwitchValue(ValueInHEX,BoolActivated)
  108.  b=UPM_IsValueActivated(ValueInHEX)
  109.  if b=true and BoolActivated=true then
  110.     'do nothing, value already activated
  111.  else
  112.     if b=false and BoolActivated=false then
  113.        'do nothing, value already deactivated
  114.     else
  115.        UPM_sAll=RegReadValue(UPM_GetUPMRegPath)
  116.        UPM_sAll=CStr(UPM_sAll)
  117.        
  118.        UPM_s=left(UPM_sAll,2) 'extract first byte 
  119.        UPM_sV="&H" & UPM_s
  120.  
  121.        if BoolActivated=true then
  122.           UPM_sV=UPM_sV+ValueInHEX
  123.        else
  124.           UPM_sV=UPM_sV-ValueInHEX
  125.        end if
  126.  
  127.        UPM_s=Hex(UPM_sV) & right(UPM_sAll,len(UPM_sAll)-2)
  128.        Call RegWriteValue(UPM_GetUPMRegPath,UPM_s,3)
  129.     end if
  130.  end if
  131. End Sub